package modes

//import "fmt"

type OrderInfo struct {
	Sign []OrderSign      `json:"sig" xorm:"extends"`
	Scho []OrderSchooling `json:"sch" xorm:"extends"`
	Cert []OrderCerti     `json:"cer" xorm:"extends"`
	Clas []OrderClasses   `json:"cla" xorm:"extends"`
}

/*
 * 描述: 订单详情列表
 *
 ***************************************************************************************/
func (this *OrderInfo) Info(id int64) error {
	var certi OrderCerti
	if list, err := certi.List(id); nil == err {
		this.Cert = list
	} else {
		return err
	}
	var sign OrderSign
	if list, err := sign.List(id); nil == err {
		this.Sign = list
	} else {
		return err
	}
	var classes OrderClasses
	if list, err := classes.List(id); nil == err {
		this.Clas = list
	} else {
		return err
	}
	var school OrderSchooling
	if list, err := school.List(id); nil == err {
		this.Scho = list
	} else {
		return err
	}
	return nil
}
